package com.hb.umsp.util.token;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class TokenAuthNullException extends Exception {

    Logger log = LoggerFactory.getLogger(TokenAuthNullException.class);

    /**
     * 用户 token 为空
     * @return
     */
    @ResponseBody
    @ExceptionHandler(value = GlobalExceptionHandler.class)
    public String tokenNullExceptionHandler(){
        log.error("token 为空");
        return "token 为空";
    }

}
